<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>CCPhysicsShape Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.2 (build 963)" />
	</head>
	<body>
		<header id="top_header">
			<div id="library" class="hideInXcode">
				<h1><a id="libraryTitle" href="../index.html">Cocos2D </a></h1>
				<a id="developerHome" href="../index.html">3.2.0</a>
			</div>
			
			<div id="title" role="banner">
				<h1 class="hideInXcode">CCPhysicsShape Class Reference</h1>
			</div>
			<ul id="headerButtons" role="toolbar">
				<li id="toc_button">
					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
				</li>
				<li id="jumpto_button" role="navigation">
					<select id="jumpTo">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	
	
	
	
	<option value="tasks">Tasks</option>
	
	
	
	
	
	<option value="properties">Properties</option>
	
	<option value="//api/name/area">&nbsp;&nbsp;&nbsp;&nbsp;area</option>
	
	<option value="//api/name/collisionCategories">&nbsp;&nbsp;&nbsp;&nbsp;collisionCategories</option>
	
	<option value="//api/name/collisionGroup">&nbsp;&nbsp;&nbsp;&nbsp;collisionGroup</option>
	
	<option value="//api/name/collisionMask">&nbsp;&nbsp;&nbsp;&nbsp;collisionMask</option>
	
	<option value="//api/name/collisionType">&nbsp;&nbsp;&nbsp;&nbsp;collisionType</option>
	
	<option value="//api/name/density">&nbsp;&nbsp;&nbsp;&nbsp;density</option>
	
	<option value="//api/name/elasticity">&nbsp;&nbsp;&nbsp;&nbsp;elasticity</option>
	
	<option value="//api/name/friction">&nbsp;&nbsp;&nbsp;&nbsp;friction</option>
	
	<option value="//api/name/mass">&nbsp;&nbsp;&nbsp;&nbsp;mass</option>
	
	<option value="//api/name/node">&nbsp;&nbsp;&nbsp;&nbsp;node</option>
	
	<option value="//api/name/sensor">&nbsp;&nbsp;&nbsp;&nbsp;sensor</option>
	
	<option value="//api/name/surfaceVelocity">&nbsp;&nbsp;&nbsp;&nbsp;surfaceVelocity</option>
	
	
	
	
	<option value="class_methods">Class Methods</option>
	
	<option value="//api/name/circleShapeWithRadius:center:">&nbsp;&nbsp;&nbsp;&nbsp;+ circleShapeWithRadius:center:</option>
	
	<option value="//api/name/pillShapeFrom:to:cornerRadius:">&nbsp;&nbsp;&nbsp;&nbsp;+ pillShapeFrom:to:cornerRadius:</option>
	
	<option value="//api/name/polygonShapeWithPoints:count:cornerRadius:">&nbsp;&nbsp;&nbsp;&nbsp;+ polygonShapeWithPoints:count:cornerRadius:</option>
	
	<option value="//api/name/rectShape:cornerRadius:">&nbsp;&nbsp;&nbsp;&nbsp;+ rectShape:cornerRadius:</option>
	
	
	
	
	
</select>
				</li>
			</ul>
		</header>
		<nav id="tocContainer" class="isShowingTOC">
			<ul id="toc" role="tree">
				
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>




<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Creating a CCPhysicsShape Object">Creating a CCPhysicsShape Object</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Accessing Basic Shape Attributes">Accessing Basic Shape Attributes</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Accessing Collision and Contact Attributes">Accessing Collision and Contact Attributes</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Accessing Misc Attributes">Accessing Misc Attributes</a></span></li>
	
</ul></li>





<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/area">area</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/collisionCategories">collisionCategories</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/collisionGroup">collisionGroup</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/collisionMask">collisionMask</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/collisionType">collisionType</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/density">density</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/elasticity">elasticity</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/friction">friction</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/mass">mass</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/node">node</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sensor">sensor</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/surfaceVelocity">surfaceVelocity</a></span></li>
	
</ul></li>



<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/circleShapeWithRadius:center:">circleShapeWithRadius:center:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/pillShapeFrom:to:cornerRadius:">pillShapeFrom:to:cornerRadius:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/polygonShapeWithPoints:count:cornerRadius:">polygonShapeWithPoints:count:cornerRadius:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/rectShape:cornerRadius:">rectShape:cornerRadius:</a></span></li>
	
</ul></li>




			</ul>
		</nav>
		<article>
			<div id="contents" class="isShowingTOC" role="main">
				<a title="CCPhysicsShape Class Reference" name="top"></a>
				<div class="main-navigation navigation-top">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="header">
					<div class="section-header">
						<h1 class="title title-header">CCPhysicsShape Class Reference</h1>
					</div>		
				</div>
				<div id="container">	
					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<td class="specification-title">Inherits from</td>
	<td class="specification-value">NSObject</td>
</tr><tr>
	<td class="specification-title">Declared in</td>
	<td class="specification-value">CCPhysicsShape.h</td>
</tr>
						</tbody></table></div>
					
                    
                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>Every <a href="../Classes/CCPhysicsBody.html">CCPhysicsBody</a> has at least one shape attached to it. Normally the shape is created for you when creating the body.
If you wish to create a composite body that is composed of multiple shapes, you can create them yourself and then create the body from them.
This gives you extra flexibility in designing a complex shape or setting up different physics properties on different parts of the body.</p>

<p>Another thing to keep in mind is that the collision detection of the underlying physics library (Chipmunk2D), is based around shapes and not bodies.
CCPhysicsCollisionPairDelegate methods will be invoked based on specific shapes colliding and not the physics bodies or nodes that own them.
Using simple shapes instead of composite ones can make collision handling code simpler depending on what you need to do.</p>
					</div>
					
					
					
					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						<h2 class="subtitle subtitle-tasks">Tasks</h2>
						
						
						<a title="Creating a CCPhysicsShape Object" name="task_Creating a CCPhysicsShape Object"></a>
						<h3 class="subsubtitle task-title">Creating a CCPhysicsShape Object</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/circleShapeWithRadius:center:">+&nbsp;circleShapeWithRadius:center:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/rectShape:cornerRadius:">+&nbsp;rectShape:cornerRadius:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/pillShapeFrom:to:cornerRadius:">+&nbsp;pillShapeFrom:to:cornerRadius:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/polygonShapeWithPoints:count:cornerRadius:">+&nbsp;polygonShapeWithPoints:count:cornerRadius:</a></code>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Accessing Basic Shape Attributes" name="task_Accessing Basic Shape Attributes"></a>
						<h3 class="subsubtitle task-title">Accessing Basic Shape Attributes</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/mass">&nbsp;&nbsp;mass</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/area">&nbsp;&nbsp;area</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/density">&nbsp;&nbsp;density</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/friction">&nbsp;&nbsp;friction</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/elasticity">&nbsp;&nbsp;elasticity</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/surfaceVelocity">&nbsp;&nbsp;surfaceVelocity</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li>
						</ul>
						
						
						<a title="Accessing Collision and Contact Attributes" name="task_Accessing Collision and Contact Attributes"></a>
						<h3 class="subsubtitle task-title">Accessing Collision and Contact Attributes</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/sensor">&nbsp;&nbsp;sensor</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/collisionGroup">&nbsp;&nbsp;collisionGroup</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/collisionType">&nbsp;&nbsp;collisionType</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/collisionCategories">&nbsp;&nbsp;collisionCategories</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/collisionMask">&nbsp;&nbsp;collisionMask</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li>
						</ul>
						
						
						<a title="Accessing Misc Attributes" name="task_Accessing Misc Attributes"></a>
						<h3 class="subsubtitle task-title">Accessing Misc Attributes</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/node">&nbsp;&nbsp;node</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li>
						</ul>
						
					</div>
					
					
					
					
					
					<div class="section section-methods">
						<a title="Properties" name="properties"></a>
						<h2 class="subtitle subtitle-methods">Properties</h2>
						
						<div class="section-method">
	<a name="//api/name/area" title="area"></a>
	<h3 class="subsubtitle method-title">area</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Area of the shape in points<sup>2</sup>.
Please note that this is relative to the <a href="../Classes/CCPhysicsNode.html">CCPhysicsNode</a> the shape is attached to, changing the <a href="#//api/name/node">node</a> or a parent can change the area.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) CGFloat area</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/collisionCategories" title="collisionCategories"></a>
	<h3 class="subsubtitle method-title">collisionCategories</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>An array of NSString category names of which this shape is a member. Up to 32 unique categories can be used in a single physics <a href="#//api/name/node">node</a>.
A value of nil means that a shape exists in all possible collision categories.
The deefault is nil.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, copy) NSArray *collisionCategories</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/collisionGroup" title="collisionGroup"></a>
	<h3 class="subsubtitle method-title">collisionGroup</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The shape&rsquo;s collisionGroup, if two physics bodies share the same group id, they don&rsquo;t collide. Defaults to nil.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) id collisionGroup</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/collisionMask" title="collisionMask"></a>
	<h3 class="subsubtitle method-title">collisionMask</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>An array of NSString category names that this shape wants to collide with.
The categories/masks of both shapes must agree for a collision to occur.
A value of nil means that this body will collide with a shape in any category.
The default is nil.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, copy) NSArray *collisionMask</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/collisionType" title="collisionType"></a>
	<h3 class="subsubtitle method-title">collisionType</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>A string that identifies the collision pair delegate method that should be called. Default value is @&ldquo;default&rdquo;.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, copy) NSString *collisionType</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/density" title="density"></a>
	<h3 class="subsubtitle method-title">density</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Density of the shape in 1/1000 units of <a href="#//api/name/mass">mass</a> per points<sup>2</sup>. The co-efficent is used to keep the <a href="#//api/name/mass">mass</a> of an object a reasonably small value.
Note that <a href="#//api/name/mass">mass</a> and not density will remain constant if an object is rescaled.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CGFloat density</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/elasticity" title="elasticity"></a>
	<h3 class="subsubtitle method-title">elasticity</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Elasticity of the physics shape.
When two objects collide, their elasticity is multiplied together.
The calculated value can be ovrriden in a CCCollisionPairDelegate pre-solve method.
Defaults to 0.2.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CGFloat elasticity</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/friction" title="friction"></a>
	<h3 class="subsubtitle method-title">friction</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Surface friction of the shape, when two objects collide, their friction is multiplied together.
The calculated value can be overridden in a CCCollisionPairDelegate pre-solve method.
Defaults to 0.7</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CGFloat friction</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/mass" title="mass"></a>
	<h3 class="subsubtitle method-title">mass</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Mass of the physics shape.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CGFloat mass</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/node" title="node"></a>
	<h3 class="subsubtitle method-title">node</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The <a href="../Classes/CCNode.html">CCNode</a> to which this physics shape is attached.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) CCNode *node</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/sensor" title="sensor"></a>
	<h3 class="subsubtitle method-title">sensor</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Is this shape a sensor? A sensor will call a collision delegate but does not physically cause collisions between bodies.
Defaults to NO</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL sensor</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/surfaceVelocity" title="surfaceVelocity"></a>
	<h3 class="subsubtitle method-title">surfaceVelocity</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Velocity of the surface of a shape relative to it&rsquo;s normal velocity.  This is useful for modelling conver belts or the feet of a player&rsquo;s avatar.
The calculated surface velocity of two colliding shapes by default only affects their <a href="#//api/name/friction">friction</a>.
The calculated value can be overriden in a CCCollisionPairDelegate pre-solve method.
Defaults to CGPointZero.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CGPoint surfaceVelocity</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					<div class="section section-methods">
						<a title="Class Methods" name="class_methods"></a>
						<h2 class="subtitle subtitle-methods">Class Methods</h2>
						
						<div class="section-method">
	<a name="//api/name/circleShapeWithRadius:center:" title="circleShapeWithRadius:center:"></a>
	<h3 class="subsubtitle method-title">circleShapeWithRadius:center:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Creates and retuns a circular physics shape using the circle radius and center values specified.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (CCPhysicsShape *)circleShapeWithRadius:(CGFloat)<em>radius</em> center:(CGPoint)<em>center</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>radius</em></dt>
			<dd><p>Circle radius.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>center</em></dt>
			<dd><p>Circle center point.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>The CCPhysicsShape Object.</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/pillShapeFrom:to:cornerRadius:" title="pillShapeFrom:to:cornerRadius:"></a>
	<h3 class="subsubtitle method-title">pillShapeFrom:to:cornerRadius:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Creates and returns a pill shaped physics shape with rounded corners that stretches from &lsquo;start&rsquo; to &lsquo;end&rsquo;.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (CCPhysicsShape *)pillShapeFrom:(CGPoint)<em>from</em> to:(CGPoint)<em>to</em> cornerRadius:(CGFloat)<em>cornerRadius</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>from</em></dt>
			<dd><p>Start point.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>to</em></dt>
			<dd><p>End point.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>cornerRadius</em></dt>
			<dd><p>Corner radius.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>The CCPhysicsShape Object.</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/polygonShapeWithPoints:count:cornerRadius:" title="polygonShapeWithPoints:count:cornerRadius:"></a>
	<h3 class="subsubtitle method-title">polygonShapeWithPoints:count:cornerRadius:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Creates and returns a convex polygon physics shape with rounded corners.  If the points do not form a convex polygon then a convex hull will be created from them automatically.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (CCPhysicsShape *)polygonShapeWithPoints:(CGPoint *)<em>points</em> count:(NSUInteger)<em>count</em> cornerRadius:(CGFloat)<em>cornerRadius</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>points</em></dt>
			<dd><p>Points array pointer.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>count</em></dt>
			<dd><p>Points count.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>cornerRadius</em></dt>
			<dd><p>Corner radius.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>The CCPhysicsShape Object.</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/rectShape:cornerRadius:" title="rectShape:cornerRadius:"></a>
	<h3 class="subsubtitle method-title">rectShape:cornerRadius:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Creates and returns a physics box shape with rounded corners.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (CCPhysicsShape *)rectShape:(CGRect)<em>rect</em> cornerRadius:(CGFloat)<em>cornerRadius</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>rect</em></dt>
			<dd><p>Box dimensions.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>cornerRadius</em></dt>
			<dd><p>Corner radius.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>The CCPhysicsShape Object.</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCPhysicsShape.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					
                    
                    
				</div>
				<div class="main-navigation navigation-bottom">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="footer">
					<hr />
					<div class="footer-copyright">
						<p><span class="copyright">&copy; 2014 3.2.0. All rights reserved. (Last updated: 2014-08-12)</span><br />
						
						<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 963)</a>.</span></p>
						
					</div>
				</div>
			</div>
		</article>
		<script type="text/javascript">
			function jumpToChange()
			{
				window.location.hash = this.options[this.selectedIndex].value;
			}
			
			function toggleTOC()
			{
				var contents = document.getElementById('contents');
				var tocContainer = document.getElementById('tocContainer');
				
				if (this.getAttribute('class') == 'open')
				{
					this.setAttribute('class', '');
					contents.setAttribute('class', '');
					tocContainer.setAttribute('class', '');
					
					window.name = "hideTOC";
				}
				else
				{
					this.setAttribute('class', 'open');
					contents.setAttribute('class', 'isShowingTOC');
					tocContainer.setAttribute('class', 'isShowingTOC');
					
					window.name = "";
				}
				return false;
			}
			
			function toggleTOCEntryChildren(e)
			{
				e.stopPropagation();
				var currentClass = this.getAttribute('class');
				if (currentClass == 'children') {
					this.setAttribute('class', 'children open');
				}
				else if (currentClass == 'children open') {
					this.setAttribute('class', 'children');
				}
				return false;
			}
			
			function tocEntryClick(e)
			{
				e.stopPropagation();
				return true;
			}
			
			function init()
			{
				var selectElement = document.getElementById('jumpTo');
				selectElement.addEventListener('change', jumpToChange, false);
				
				var tocButton = document.getElementById('table_of_contents');
				tocButton.addEventListener('click', toggleTOC, false);
				
				var taskTreeItem = document.getElementById('task_treeitem');
				if (taskTreeItem.getElementsByTagName('li').length > 0)
				{
					taskTreeItem.setAttribute('class', 'children');
					taskTreeItem.firstChild.setAttribute('class', 'disclosure');
				}
				
				var tocList = document.getElementById('toc');
				
				var tocEntries = tocList.getElementsByTagName('li');
				for (var i = 0; i < tocEntries.length; i++) {
					tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
				}
				
				var tocLinks = tocList.getElementsByTagName('a');
				for (var i = 0; i < tocLinks.length; i++) {
					tocLinks[i].addEventListener('click', tocEntryClick, false);
				}
				
				if (window.name == "hideTOC") {
					toggleTOC.call(tocButton);
				}
			}
			
			window.onload = init;
			
			// If showing in Xcode, hide the TOC and Header
			if (navigator.userAgent.match(/xcode/i)) {
				document.getElementById("contents").className = "hideInXcode"
				document.getElementById("tocContainer").className = "hideInXcode"
				document.getElementById("top_header").className = "hideInXcode"
			}
			
		</script>
	</body>
</html>